#ifndef AUTOMATICCTRL_H
#define AUTOMATICCTRL_H

//(*Headers(AutomaticCtrl)
#include <wx/button.h>
#include <wx/frame.h>
#include <wx/choice.h>
//*)

#include "RosInterface.h"
#include "ProcessManager.h"

class AutomaticCtrl: public wxFrame
{
	public:
        RosInterface *Ri;
        ProcessManager *PM;
        std::vector<srs_msgs::GraspSubConfiguration> grasp_configurations;

		AutomaticCtrl(wxWindow* parent, RosInterface *Ri, ProcessManager *PM, wxWindowID id=wxID_ANY,const wxPoint& pos=wxDefaultPosition,const wxSize& size=wxDefaultSize);
		virtual ~AutomaticCtrl();

		//(*Declarations(AutomaticCtrl)
		wxChoice* grasp_desplegable;
		wxChoice* det_desplegable;
		wxButton* Button1;
		wxButton* Button2;
		wxButton* Button3;
		//*)

	protected:
        std::vector<cob_object_detection_msgs::Detection> detected_objects;

		//(*Identifiers(AutomaticCtrl)
		static const long ID_BUTTON1;
		static const long ID_BUTTON4;
		static const long ID_BUTTON5;
		static const long ID_CHOICE1;
		static const long ID_CHOICE2;
		//*)

	private:

		//(*Handlers(AutomaticCtrl)
		void DetectObjects(wxCommandEvent& event);
		void getGrasps(wxCommandEvent& event);
		void simulateGrasp(wxCommandEvent& event);
		void graspObject(wxCommandEvent& event);
		//*)

		DECLARE_EVENT_TABLE()
};

#endif
